$(document).ready(function(){
if (localStorage.pagecount)
	{
	localStorage.pagecount=Number(localStorage.pagecount) +1;
	}
else
	{
	localStorage.pagecount=1;
	}
document.getElementById('logincount').innerHTML="您已经访问: " + localStorage.pagecount + " 次."}
)

/* 备选登录次数
var storage = window.localStorage;
if (!storage.getItem("pageLoadCount")) storage.setItem("pageLoadCount",0);
storage.pageLoadCount = parseInt(storage.getItem("pageLoadCount")) + 1;//必须格式转换
document.getElementById("logincount").innerHTML = storage.pageLoadCount;
showStorage();
*/
/*$(document).ready(
function joking() {

    $.ajax({
        type:'GET',
        dataType:"jsonp",
        url:"http://japi.juhe.cn/joke/content/list.from?key=8d56e8da2085a0ede70294dbc79c0aeb&page=1&pagesize=1&sort=asc&time=1418745237&callback=theFunctionName",
        contentType:"application/json",

        jsonCallback:"?",
        success:function () {
               alert("1");
               var joke = JSON.parse(result.content);
            ('.error').click(function(event) {
                    event.preventDefault();
                    event.stopPropagation();
                    return $.growl.error({
                        title: "轻松一下",
                        message:joke
                    });
               $('#joke1').innerHTML="0";
            }},
        /*   error:function(){alert("fail!");}

});
})*/

//阿里云check1

    function joking() {
            var Time =$("#Time").val();
            var End = $("#end").val();
            var Start =$("#start").val();
        $.ajax({
            type:"GET",
            url:"http://jisutrain.market.alicloudapi.com/train/ticket?date="+Time+"&end="+End+"&start="+Start,


            dataType: "json",

           headers:{
               "Authorization":"APPCODE 849ec37b485d4567a6d30bbe9b558cd3"},
            success:function(result) {
               /* innerhtml失败的代码是否是格式问题var trainno=$("#trainno");
                trainno.innerHTML=result.result[1].trainno;
                var traintype=$("#traintype");*/
                
                var str="<table border='1'>";
                var len=result.result.length;

                for(var i=0;i<len;i++)
                {
                    str+="<tr><td>"+result.result[i].trainno+"</td><td>"+result.result[i].type+"</td><td>"+result.result[i].departstation+"</td><td>"+result.result[i].terminalstation+"</td><td>"
                        +result.result[i].starttime+"</td><td>"+result.result[i].endtime+"</td><td>"+result.result[i].ed+"</td></tr>";

                }
                str+="</table>";
                $("#feedbackTable").html(str);

                    console.log(str);
                    console.log(result.result[0].station);
            },
            error: function () {

                alert("加载错误");
            }})
        }


/*待调试
$(document).ready(function(){

    var search_name = $("#username");
    var name = localStorage.getItem(data.name);
    search_name.innerHTML =  "用户名:" + name;

    var search_phone = $("#phoneNumber");
    var call = localStorage.getItem(data.phone);
    search_phone.innerHTML =  "电话号码：" + call;

    var search_email = $("#email");
    var email = localStorage.getItem(data.email);
    search_phone.innerHTML =  "邮箱：" + email;

    var search_time = $("#registertime");
    var time = localStorage.getItem(data.timenow);
    search_time.innerHTML =  "注册时间：" + time;

})

*/